1. Field of the Invention
The present invention relates to a coding apparatus for image compression that compresses the data of a digital image signal.
2. Description of the Related Art
As a highly efficient compression technique for encoding natural images, there has been proposed a method of performing a 2-dimensional discrete cosine transform (called a DCT hereafter) and quantizing the transform coefficients to encode them into variable-length codes. This method is adopted by the JPEG (Joint Photographic Experts Group) of CCITT/ISO.
The variable-length coding part of this method uses a single table of codes to perform variable-length coding. However, if statistical properties of input symbols and characteristics of the variable-length coding are in disagreement, the efficiency of the coding declines. Therefore, a method of preparing several tables of variable-length codes and selecting one of them for encoding was proposed (For example, see Japanese Laid-open Patent Publication Hei. 4-87469).
In this method, the variance of the DCT coefficients after quantizing in each block is obtained, and one of the several tables of variable-length codes is selected based on the variance to perform the variable-length coding.
However, the statistical properties of occurring symbols vary not only from block to block but also vary greatly depending on the order of the transformed domain in each block. Therefore, by the above method, a table of variable-length codes can not be selected depending on the order of the transformed domain. Further, the method requires much more overhead information for indicating a selected table of variable-length codes.